<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>ChangeTitle</title>
</head>
<body>
    <div onclick="changeTitle(123)">changeTitle</div>
</body>
<script>
    function getTitle(){
        return document.title
    }

    function changeTitle(t){
        document.title = t
        return document.title
    }
</script>
</html>